package com.yidu.hbats.action.Attachment;

import com.yidu.hbats.model.AtsAttachmentEmp;
import com.yidu.hbats.model.AtsSchemeAudit;
import com.yidu.hbats.service.attachment.AtsAttachmentEmpService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/atsAttachmentEmp")
public class AtsAttachmentEmpController {
 @Resource
    AtsAttachmentEmpService atsAttachmentEmpService;


    @ResponseBody
    @RequestMapping("isLook")
    public int isLook(AtsAttachmentEmp atsAttachmentEmp){

        atsAttachmentEmp.setIsLook(1);
        return atsAttachmentEmpService.updateByPrimaryKeySelective(atsAttachmentEmp);
    }

    @ResponseBody
    @RequestMapping("findBySaid")
    public Map<String,Object> findBySaid(Integer saId){

       Map<String,Object> map = new HashMap<String,Object>();
       List<AtsSchemeAudit> atsSchemeAudits = atsAttachmentEmpService.selBySaid(saId);
        map.put("code",0); // 放入 code ，0
        map.put("msg", ""); // 放入msg “”
        map.put("data", atsSchemeAudits);
        return map;
    }
    /**
     * 根据登录人员查看未查看通知数
     */


}
